package com.youku.plugins.commonui
{
   import com.youku.interfaces.IPlugin;
   import flash.display.MovieClip;
   import com.youku.interfaces.IPlayerProxy;
   import com.youku.plugins.commonui.view.LoadingScreenMediator;
   import com.youku.plugins.commonui.view.VideoOverLayerMediator;
   import com.youku.plugins.commonui.view.ReadyToPlayScreenV4Mediator;
   import com.youku.plugins.commonui.view.NoticeCardMediator;
   import com.youku.plugins.commonui.view.AlertBoxMediator;
   import com.youku.ViewManager;
   import com.youku.plugins.commonui.view.PostVideoScreenMediator;
   import com.youku.plugins.commonui.view.PreVideoScreenMediator;
   import com.youku.plugins.commonui.view.BackgroundMediator;
   
   public class CommonUIFacade extends Object implements IPlugin
   {
      
      public function CommonUIFacade() {
         super();
      }
      
      private static var _instance:CommonUIFacade;
      
      public static function getInstance() : CommonUIFacade {
         if(_instance == null)
         {
            _instance = new CommonUIFacade();
         }
         return _instance as CommonUIFacade;
      }
      
      private var _mediators:Array;
      
      public function init(param1:MovieClip, param2:IPlayerProxy) : void {
         var _loc7_:LoadingScreenMediator = null;
         var _loc8_:VideoOverLayerMediator = null;
         var _loc9_:ReadyToPlayScreenV4Mediator = null;
         var _loc10_:NoticeCardMediator = null;
         var _loc11_:AlertBoxMediator = null;
         this._mediators = new Array();
         var _loc3_:ViewManager = param1 as ViewManager;
         CommonUIFont.setCommonUIFont();
         _loc7_ = new LoadingScreenMediator(_loc3_.controlsLayer,param2);
         _loc8_ = new VideoOverLayerMediator(_loc3_.videoOverLayer,param2);
         _loc9_ = new ReadyToPlayScreenV4Mediator(_loc3_.videoOverLayer,param2);
         _loc10_ = new NoticeCardMediator(_loc3_.pluginLayer,param2);
         _loc11_ = new AlertBoxMediator(_loc3_.controlsLayer,param2);
         this._mediators.push(_loc7_);
         this._mediators.push(_loc8_);
         this._mediators.push(_loc9_);
         this._mediators.push(_loc10_);
         this._mediators.push(_loc11_);
         var _loc4_:PostVideoScreenMediator = new PostVideoScreenMediator(_loc3_.pluginLayer,param2);
         var _loc5_:PreVideoScreenMediator = new PreVideoScreenMediator(_loc3_.pluginLayer,param2);
         var _loc6_:BackgroundMediator = new BackgroundMediator(_loc3_.background,param2);
         this._mediators.push(_loc4_);
         this._mediators.push(_loc5_);
         this._mediators.push(_loc6_);
      }
   }
}
